<% @page_title = "多背一公斤 | 编辑照片"%>

<% content_for(:sidebar) do %>
<% end %>

<h3>分享照片</h3>
<h3 class="nt">上传的照片<%= title_suffix %></h3>
<p>这是你刚刚上传的照片，加上标题和描述可以分享你更多的旅途感受</p>

<% form_for :photo, :url => photo_url(@photo), :html => {:method => 'put'} do |f| %>
<h3 class="nt"><label for="photo_title">照片标题<%= title_suffix %></h3>
	
<p><%= f.text_field :title %></p>

<div><%= image_tag(@photo.public_filename(:medium)) %></div>

<h3 class="nt"><label for="photo_description">照片描述<%= title_suffix %></h3>
  <%= f.text_area :description, :rows => 8, :cols => 60 %></p>
  
  <%= submit_tag "写好了，提交" %>
<% end %>